/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>

#import "OFXObject.h"
#import "OFXLoanAccount.h"

@interface OFX401kLoan : OFXObject {
  NSString* loanId;
  NSString* loanDescription;
  NSNumber* initialBalance;
  NSDate* startDate;
  NSNumber* currentBalance;
  NSDate* currentBalanceValidAsOf;
  NSNumber* annualInterestRate;
  NSNumber* paymentAmount;
  NSString* paymentFrequency;
  NSNumber* initialNumberLoanPayments;
  NSNumber* paymentsRemaining;
  NSDate* maturityDate;
  NSNumber* totalProjectedInterest;
  NSNumber* totalInterestToDate;
  NSDate* nextPaymentDate;
}

/**
 * @property loanId
 * @brief Indicates that the transaction was due to a loan or a loan repayment, 
 * and which loan it was. A-32
 */
@property(retain) NSString* loanId;

/**
 * @property loanDescription
 * @brief Loan description, A-32
 */
@property(retain) NSString* loanDescription;

/**
 * @property initialBalance
 * @brief Initial loan balance.
 */
@property(retain) NSNumber* initialBalance;

/**
 * @property startDate
 * @brief Start date of loan.
 */
@property(retain) NSDate* startDate;

/**
 * @property currentBalance
 * @brief Current loan principal balance.
 */
@property(retain) NSNumber* currentBalance;

/**
 * @property currentBalanceValidAsOf
 * @brief Date and time of the current loan balance.
 */
@property(retain) NSDate* currentBalanceValidAsOf;

/**
 * @property annualInterestRate
 * @brief Loan annual interest rate.
 */
@property(retain) NSNumber* annualInterestRate;

/**
 * @property paymentAmount
 * @brief Loan payment amount.
 */
@property(retain) NSNumber* paymentAmount;

/**
 * @property paymentFrequency
 * @brief Frequency of loan repayments.
 *
 * Valid values:
 * - WEEKLY
 * - BIWEEKLY
 * - TWICEMONTHLY
 * - MONTHLY
 * - FOURWEEKS
 * - BIMONTHLY 
 * - QUARTERLY
 * - SEMIANNUALLY
 * - ANNUALLY
 * - OTHER
 */
@property(retain) NSString* paymentFrequency;

/**
 * @property initialNumberLoanPayments
 * @brief Initial number of loan payments.
 */
@property(retain) NSNumber* initialNumberLoanPayments;

/**
 * @property paymentsRemaining
 * @brief Remaining number of loan payments. N-5
 */
@property(retain) NSNumber* paymentsRemaining;

/**
 * @property maturityDate
 * @brief Expected loan end date.
 */
@property(retain) NSDate* maturityDate;

/**
 * @property totalProjectedInterest
 * @brief Total projected interest to be paid on this loan.
 */
@property(retain) NSNumber* totalProjectedInterest;

/**
 * @property totalInterestToDate
 * @brief Total interested paid to date on this loan.
 */
@property(retain) NSNumber* totalInterestToDate;

/**
 * @property nextPaymentDate
 * @brief Next payment due date.
 */
@property(retain) NSDate* nextPaymentDate;

@end
